#flask报
from flask import Flask

#实例化flask
app = Flask(__name__)

#导入请求
from flask import request,jsonify

#配置全局
from flask_cors import CORS
cors = CORS(app)

#解决中文乱码
app.config['JSON_AS_ASCII']=False

#导入user 注册蓝图用f
from user import user
from goods import goods
from coupon import coupon
#注册蓝图
app.register_blueprint(user,url_prefix='/user')
app.register_blueprint(goods,url_prefix='/goods')
app.register_blueprint(coupon,url_prefix='/coupon')


@app.route('/')
async  def hello_word():
    return {'code':200,'msg':'你好世界'}


#接口 调用实例对象
if __name__ == '__main__':
    app.run(debug=True,host='0.0.0.0',port=5000)













